﻿@using Ext.Net
@using Ext.Net.MVC
@model DoAnForum.Models.ChangePasswordModel
@{
    ViewBag.Title = "Change Password";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@Html.X().ResourceManager().Theme(Theme.Default)
@Html.X().FormPanel().ID("FormPanelChangePass").Border(false).StyleSpec("position: static; z-index: 10;width: 100%;").Listeners(
    ls => ls.ValidityChange.Handler = "App.btnSave.setDisabled(!valid)").Items(
        Html.X().Label().Text("Đổi mật khẩu").StyleSpec("color:green; font-weight:bold; font-size:18").Margin(30),
        Html.X().TextFieldFor(m => m.OldPassword).InputType(Ext.Net.InputType.Password).FieldLabel("Mật khẩu cũ").LabelWidth(130).Width(500).StyleSpec("margin: 30px;"),
        Html.X().TextFieldFor(m => m.NewPassword).InputType(Ext.Net.InputType.Password).FieldLabel("Mật khẩu mới").LabelWidth(130).Width(500).StyleSpec("margin: 30px;"),
        Html.X().TextFieldFor(m => m.ConfirmPassword).InputType(Ext.Net.InputType.Password).FieldLabel("Nhập lại mật khẩu mới").LabelWidth(130).Width(500).StyleSpec("margin: 30px;"),
        Html.X().Panel().Width(100).StyleSpec("Float: right").Margin(10).Border(false).Items(
            Html.X().Button().ID("btnSave").Text("Đồng ý").Width(80).Margin(10).Disabled(true).DirectEvents(de=>
                                                                        {
                                                                            de.Click.Url = Url.Action("ChangePasswordComit");
                                                                            de.Click.EventMask.ShowMask = true;
                                                                            de.Click.FormID = "FormPanelChangePass";
                                                                        })
        )
    )